home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12000 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.6 KB  |  57 lines

  1. Path: ix.netcom.com!netnews
  2. From: miker3@ix.netcom.com (Mike Rubenstein)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: CONVERTING INTEGER TO ASCII??????
  5. Date: Thu, 28 Mar 1996 03:27:15 GMT
  6. Organization: Netcom
  7. Message-ID: <315a0571.135066665@nntp.ix.netcom.com>
  8. References: <4i17r9$2kn@maltese.eag.unisysgsg.com> <4ic9ll$cfp@news.bridge.net> <danpop.827013499@rscernix> <4iv1a6$pl2@news.bridge.net> <4jbpb2$pa9@sun001.spd.dsccc.com>
  9. NNTP-Posting-Host: ix-dc9-12.ix.netcom.com
  10. X-NETCOM-Date: Wed Mar 27  7:27:05 PM PST 1996
  11. X-Newsreader: Forte Agent .99d/32.182
  12.  
  13. jmccarty@sun1307.spd.dsccc.com (Mike McCarty) wrote:
  14.  
  15. > In article <4iv1a6$pl2@news.bridge.net>,
  16. > Gary Thompson <psycho@bridge.net> wrote:
  17. > )danpop@mail.cern.ch (Dan Pop) wrote:
  18. > )
  19. > )>In <4ic9ll$cfp@news.bridge.net> psycho@bridge.net (Gary Thompson) writes:
  20. > )
  21. > )>>buff=itoa(intvalue,buff,10); (I think...)
  22. > )
  23. > )>And you're wrong.  There is no itoa function in the C language.
  24. > )
  25. > )>K&R2 contains such a function (as an example), at page 64, but it has
  26. > )>only two arguments :-)
  27. > )
  28. > )Then what is this...  (badly copied from my C compiler)
  29. > )ª----------------------------------------------------------------------------
  30. > )ª                                                                           _
  31. > )ª  Include:  <stdlib.h>                                                     _
  32. > )ª                                                                           _
  33. > )ª  Syntax:   char *itoa( int value, char *string, int radix );              _
  34. > )ª            char *ltoa( long value, char *string, int radix );             _
  35. > )ª            char *ultoa( unsigned long value, char *string, int radix );   _
  36. > )ª                                                                           _
  37. > )ª  Returns:  a pointer to <string>.                                         _
  38. > )ª                                    --                                       
  39. > )ª___________________________________________________________________________ª
  40. > [some control characters edited out and width reduced]
  41. > This is a routine which your link library designer decided to put in.
  42. > It is not a standard C routine. Library designers are required to put
  43. > certain functionality into the library. There is (AFAIK) no
  44. > functionality they are required to omit. Since the C language is
  45. > defined by a standard, not by an implementation, implementation
  46. > arguments are irrelevant. 
  47.  
  48. Correct, but let's add that an implementation that defines itoa (or
  49. ltoa or ultoa) in <stdlib.h> does not conform to the standard.  The
  50. standard does not allow an implementation to define these identifiers
  51. in a standard header.
  52.  
  53.  
  54. Michael M Rubenstein
  55.